package za.co.smartmi.dao;

import za.co.smartmi.model.Product;
import za.co.smartmi.model.ProductPk;
import za.co.smartmi.dao.exceptions.ProductDaoException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import za.co.smartmi.dao.support.JdbcDao;

public interface ProductDao extends JdbcDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return ProductPk
	 */
	public ProductPk insert(Product dto);

	/** 
	 * Updates a single row in the product table.
	 */
	public void update(ProductPk pk, Product dto) throws ProductDaoException;

	/** 
	 * Deletes a single row in the product table.
	 */
	public void delete(ProductPk pk) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'productid = :productid'.
	 */
	public Product findByPrimaryKey(Integer productid) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria ''.
	 */
	public List<Product> findAll() throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'productid = :productid'.
	 */
	public List<Product> findWhereProductidEquals(Integer productid) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'name = :name'.
	 */
	public List<Product> findWhereNameEquals(String name) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'desc = :desc'.
	 */
	public List<Product> findWhereDescEquals(String desc) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'type = :type'.
	 */
	public List<Product> findWhereTypeEquals(String type) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'cover = :cover'.
	 */
	public List<Product> findWhereCoverEquals(BigDecimal cover) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'premium = :premium'.
	 */
	public List<Product> findWherePremiumEquals(BigDecimal premium) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'adminfee = :adminfee'.
	 */
	public List<Product> findWhereAdminfeeEquals(BigDecimal adminfee) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'coverfee = :coverfee'.
	 */
	public List<Product> findWhereCoverfeeEquals(BigDecimal coverfee) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'vatfee = :vatfee'.
	 */
	public List<Product> findWhereVatfeeEquals(BigDecimal vatfee) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'otherfee = :otherfee'.
	 */
	public List<Product> findWhereOtherfeeEquals(BigDecimal otherfee) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'status = :status'.
	 */
	public List<Product> findWhereStatusEquals(String status) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'startdate = :startdate'.
	 */
	public List<Product> findWhereStartdateEquals(Date startdate) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'enddate = :enddate'.
	 */
	public List<Product> findWhereEnddateEquals(Date enddate) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'csys = :csys'.
	 */
	public List<Product> findWhereCsysEquals(String csys) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'cdate = :cdate'.
	 */
	public List<Product> findWhereCdateEquals(Date cdate) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'usys = :usys'.
	 */
	public List<Product> findWhereUsysEquals(String usys) throws ProductDaoException;

	/** 
	 * Returns all rows from the product table that match the criteria 'udate = :udate'.
	 */
	public List<Product> findWhereUdateEquals(Date udate) throws ProductDaoException;

	/** 
	 * Returns the rows from the product table that matches the specified primary-key value.
	 */
	public Product findByPrimaryKey(ProductPk pk) throws ProductDaoException;

}
